package com.hdwe.tools.pm.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hdwe.tools.pm.domain.PmRequire;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.time.LocalDateTime;

/**
 * 需求业务对象 pm_require
 *
 * @author s
 * @date 2024-12-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PmRequire.class, reverseConvertGenerate = false)
public class PmRequireBo extends BaseEntity {

    /**
     * 需求主键
     */
    private Long id;

    /**
     * 租户编号
     */
    private String tenantId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 需求类型（inner内部需求 customer客户需求）
     */
    @NotBlank(message = "需求类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String requireType;

    /**
     * 优先级（low低 middle中 high高）
     */
    @NotBlank(message = "优先级不能为空", groups = { AddGroup.class, EditGroup.class })
    private String priority;

    /**
     * 内容
     */
    private String content;

    /**
     * 图片、文件
     */
    private String files;

    /**
     * 关联人员
     */
    @NotBlank(message = "关联人员不能为空", groups = { AddGroup.class, EditGroup.class })
    private String relatedUsers;

    /**
     * 截止时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    /**
     * 耗时
     */
    private Long costTime;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 负责人
     */
    @NotBlank(message = "负责人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String owner;

}
